<script setup lang="ts">
import { ConsultType } from '@/enums'
import { consultStore } from '@/stores'
const store = consultStore()
</script>
<template>
  <div class="home-navs">
    <van-row>
      <van-col span="8">
        <router-link to="/" class="nav">
          <cp-icons name="home-doctor"></cp-icons>
          <p class="title">问医生</p>
          <p class="desc">按科室查问医生</p>
        </router-link>
      </van-col>
      <van-col span="8">
        <router-link to="/consult/fast" class="nav" @click="store.setType(ConsultType.Fast)">
          <cp-icons name="home-graphic"></cp-icons>
          <p class="title">极速问诊</p>
          <p class="desc">20s医生极速回复</p>
        </router-link>
      </van-col>
      <van-col span="8">
        <router-link to="/" class="nav">
          <cp-icons name="home-prescribe"></cp-icons>
          <p class="title">开药门诊</p>
          <p class="desc">线上买药更方便</p>
        </router-link>
      </van-col>
    </van-row>
    <van-row>
      <van-col span="6">
        <router-link to="/" class="nav min">
          <cp-icons name="home-order"></cp-icons>
          <p class="title">药品订单</p>
        </router-link>
      </van-col>
      <van-col span="6">
        <router-link to="/user/patient" class="nav min">
          <cp-icons name="home-docs"></cp-icons>
          <p class="title">健康档案</p>
        </router-link>
      </van-col>
      <van-col span="6">
        <router-link to="/" class="nav min">
          <cp-icons name="home-rp"></cp-icons>
          <p class="title">我的处方</p>
        </router-link>
      </van-col>
      <van-col span="6">
        <router-link to="/" class="nav min">
          <cp-icons name="home-find"></cp-icons>
          <p class="title">疾病查询</p>
        </router-link>
      </van-col>
    </van-row>
  </div>
</template>
<style lang="scss" scoped>
.home-navs {
  padding: 10px 15px 0 15px;
  .nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    .cp-icon {
      font-size: 48px;
    }
    .title {
      font-weight: 500;
      margin-top: 5px;
      color: var(--cp-text1);
    }
    .desc {
      font-size: 11px;
      color: var(--cp-tag);
      margin-top: 2px;
    }
    &.min {
      .cp-icon {
        font-size: 31px;
      }
      .title {
        font-size: 13px;
        color: var(--cp-text2);
        font-weight: normal;
      }
    }
  }
}
</style>
